import {
  Column,
  CreateDateColumn,
  DeleteDateColumn,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';

export abstract class CommonEntity {
  @PrimaryGeneratedColumn()
  id: number;

  @Column({ default: 1, comment: '状态' })
  status: number;

  @Column({ nullable: true, comment: '描述' })
  remark: string;

  @CreateDateColumn({ select: false, comment: '创建时间' })
  createDate?: Date;

  @UpdateDateColumn({ select: false, comment: '更新时间' })
  updateDate?: Date;

  @DeleteDateColumn({ select: false, comment: '删除时间' })
  deleteDate?: Date;
}
